<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <p>{{ msg1 }}</p>
    <!-- 3.使用组件 -->
    <child></child>
    <p>
      For a guide and recipes on how to configure / customize this project,<br />
      check out the
      <a href="https://cli.vuejs.org" target="_blank" rel="noopener"
        >vue-cli documentation</a
      >.
    </p>
    <h3>Installed CLI Plugins</h3>

    <h3>Essential Links</h3>
    <h3>Ecosystem</h3>
  </div>
</template>

<script>
// import 谁 from 哪
// 1.引入
import child from "./child";
export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  data() {
    return {
      msg1: "hello vue",
    };
  },
  // 2.局部注册
  components: {
    // 组件名：组件内容
    child: child,
  },
};
</script>


<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
/* 添加scoped这个属性使得后面的css代码只用于与当前组件 */
.hello h3 {
  margin: 40px 0 0;
}
.hello ul {
  list-style-type: none;
  padding: 0;
}
.hello li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
